<script lang="ts" setup>
import { ref } from 'vue';

const currentDate = ref(new Date());
</script>

<template>
  <div class="card-box">
    <el-card shadow="hover">
      <template #header>
        <img
          src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png"
          class="image"
        />
      </template>
      <div>
        <span>Yummy hamburger</span>
        <div class="bottom">
          <time class="time">{{ currentDate }}</time>
          <el-button text class="button">Operating</el-button>
        </div>
      </div>
    </el-card>
  </div>
</template>

<style scoped lang="scss">
.card-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 24px;
}
.time {
  font-size: 12px;
  color: #999;
}

.bottom {
  margin-top: 12px;
  line-height: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.button {
  padding: 0;
  min-height: auto;
}

.image {
  width: 100%;
  display: block;
}
</style>
